package router;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 
 * @author zgy
 *
 */
@Controller
@RequestMapping(value = "transaction2zcRouter")
public class Transaction2zcRouter {

	private static Logger logger = Logger.getLogger(Transaction2zcRouter.class);

	@RequestMapping
	public String router(@RequestParam(value="funcID",defaultValue = "0000") String funcID) {
		
		if(funcID.equals("0000")) {
			//logger.info("[transactionRouter]" + funcID + " 进入早餐应用");
			return "forward:transaction2zc/intoZc";
		} else if(funcID.equals("0001")) {
			//logger.info("[transactionRouter]" + funcID + " 查询主页的早餐配送区域");
			return "forward:transaction2zc/landmarkQuery";
		}else if(funcID.equals("0002")) {
			//logger.info("[transactionRouter]" + funcID + " 查询主页的早餐订单");
			return "forward:transaction2zc/zcOrderQuery";
		}else if(funcID.equals("0003")) {
			//logger.info("[transactionRouter]" + funcID + " 查询主页的早餐订单");
			return "forward:transaction2zc/zcOrderCompletedQuery";
		}else if(funcID.equals("0011")) {
			//logger.info("[transactionRouter]" + funcID + " 1-5的早餐类目");
			return "forward:transaction2zc/zcItemsQuery";
		}else if(funcID.equals("0012")) {
			//logger.info("[transactionRouter]" + funcID + " 下单详情 ");
			return "forward:transaction2zc/zcOrderPlace";
		}else if(funcID.equals("0013")) {
			//logger.info("[transactionRouter]" + funcID + " 早餐订单提交 ");
			return "forward:transaction2zc/zcOrderCommit";
		}else if(funcID.equals("0021")) {
			//logger.info("[transactionRouter]" + funcID + " 订单流程跟踪 ");
			return "forward:transaction2zc/zcOrderLog";
		}else if(funcID.equals("0022")) {
			//logger.info("[transactionRouter]" + funcID + " 订单详情 ");
			return "forward:transaction2zc/zcOrderDetail";
		}else if(funcID.equals("0023")) {
			//logger.info("[transactionRouter]" + funcID + " 订单支付 ");
			return "forward:transaction2zc/zcOrderCommit";
		}else if(funcID.equals("0031")) {
			//logger.info("[transactionRouter]" + funcID + " 地址详情 ");
			return "forward:transaction2zc/zcAddressQuery";
		}else if(funcID.equals("0032")) {
			//logger.info("[transactionRouter]" + funcID + " 地址添加");
			return "forward:transaction2zc/zcAddressNew";
		}else if(funcID.equals("0033")) {
			//logger.info("[transactionRouter]" + funcID + " 地址修改界面 ");
			return "forward:transaction2zc/zcAddressEditUI";
		}else if(funcID.equals("0034")) {
			//logger.info("[transactionRouter]" + funcID + " 地址修改 ");
			return "forward:transaction2zc/zcAddressEdit";
		}else if(funcID.equals("0035")) {
			//logger.info("[transactionRouter]" + funcID + " 地址删除");
			return "forward:transaction2zc/zcAddressDel";
		}else if(funcID.equals("0036")) {
			//logger.info("[transactionRouter]" + funcID + " 地址切换 ");
			return "forward:transaction2zc/zcAddressCut";
		}else if(funcID.equals("0041")) {
			//logger.info("[transactionRouter]" + funcID + " 快递员登录 ");
			return "forward:transaction2zc/admin/adminLogin";
		}else if(funcID.equals("0042")) {
			//logger.info("[transactionRouter]" + funcID + " 配送订单查询 ");
			return "forward:transaction2zc/admin/zcSendItemQuery";
		}else if(funcID.equals("0043")) {
			//logger.info("[transactionRouter]" + funcID + " 配送订单查询userMp ");
			return "forward:transaction2zc/admin/zcSendItemQueryByMp";
		}else if(funcID.equals("0044")) {
			//logger.info("[transactionRouter]" + funcID + " 结束订单 ");
			return "forward:transaction2zc/admin/zcSendItemEnd";
		}else if(funcID.equals("0017")) {
			logger.info("[transactionRouter]" + funcID + " 微信支付");
			return "forward:transaction2zc/wxPayApi";			  
		}else if(funcID.equals("0018")) {
			logger.info("[transactionRouter]" + funcID + " 微信支付状态查询");
			return "forward:transaction2zc/wxPayStatus";			  
		}else {
			logger.info("no such funcID existed");
			return "forward:error";
		}
	}
}